package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"houses/api/internal/config"
	"houses/housesrpc/housesrpcclient"
)

type ServiceContext struct {
	Config    config.Config
	HousesRpc housesrpcclient.Housesrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		HousesRpc: housesrpcclient.NewHousesrpc(zrpc.MustNewClient(c.HousesRpc)),
	}
}
